<template>
  <div id="app">
    <div>
      <header class="navbar-sunshine"></header>
      <section class="YnaviContent">
        <div class="mainMenu"></div>
        <div class="right-con">
          <router-view />
        </div>
      </section>
    </div>
  </div>
</template>
<script>
export default {
  mounted() {
    let langs = this.getCookie("site_lang");
    if (langs == "en-US") {
      this.switchLang("en");
    } else if (langs == "zh_CN") {
      this.switchLang("zh");
    }
  },
  methods: {
    switchLang(val) {
      this.$i18n.locale = val; //此处val为 zh 或者 en
    },
    getCookie(cookieName) {
      var strCookie = document.cookie;
      var arrCookie = strCookie.split("; ");
      for (var i = 0; i < arrCookie.length; i++) {
        var arr = arrCookie[i].split("=");
        if (cookieName == arr[0]) {
          return arr[1];
        }
      }
      return "";
    }
  }
};
</script>
<style>
@import "./assets/css/base.css";
@import "./assets/css/index.css";
#app {
  height: 100%;
}
.el-container {
  height: 100%;
}
.el-input__inner {
  height: 34px !important;
}
.el-button {
  padding: 9px 20px !important;
}
/* .el-form-item__label{
		font-size: 13px !important;
	} */
.el-range__icon {
  line-height: 25px !important;
}
.el-range-separator {
  line-height: 22px !important;
}
.right-con {
  padding: 20px;
  background: #f8f8f8;
}
</style>
